home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / misc / bgui12.lha / docs / labelclass.doc < prev    next >
Text File  |  1995-05-21  |  7KB  |  210 lines

  1.  
  2.                File: labelclass.doc
  3.         Description: Labelclass documentation.
  4.           Copyright: (C) Copyright 1994-1995 Jaba Development.
  5.                      (C) Copyright 1994-1995 Jan van den Baard.
  6.                      All Rights Reserved.
  7.  
  8. ------------------------------------------------------------------------------
  9.  
  10. TABLE OF CONTENTS
  11.  
  12. labelclass/--background--
  13. labelclass/Methods
  14. labelclass/Attributes
  15.  
  16. labelclass/--background--                            labelclass/--background--
  17.  
  18.     NAME
  19.         Class:          labelclass
  20.         Superclass:     IMAGECLASS
  21.         Include File:   <libraries/bgui.h>
  22.  
  23.     FUNCTION
  24.         To  provide  a  general  labeling  image. It supports underscoring and
  25.         placement  of  the label simular to the gadtools gadget labels. It has
  26.         been  constructed  in  a way to make multi-line labels possible in the
  27.         future in a compatible way
  28.  
  29. labelclass/Methods                                          labelclass/Methods
  30.  
  31.     NEW METHODS
  32.         IM_EXTENT -- This  method  will ask a labelclass object for the amount
  33.                 of pixels the label extends the image bounding box.   Normally
  34.                 this method is only used by the baseclass which handles labels
  35.                 but in some cases you might need this method for yourself. The
  36.                 method uses the following custom message structure:
  37.  
  38.                 struct impExtent {
  39.                         ULONG            MethodID;      /* IM_EXTENT */
  40.                         struct RastPort *impe_RPort;
  41.                         struct IBox     *impe_Extent;
  42.                         struct {
  43.                                 UWORD   *Width;
  44.                                 UWORD   *Height;
  45.                         }                impe_LabelSize;
  46.                         UWORD            impe_Flags;
  47.                 };
  48.  
  49.                 impe_RPort -- This  must  point  to  the RastPort in which the
  50.                         label is to be rendered.  It  is copied to an internal
  51.                         buffer and on that  copy font changes and calculations
  52.                         will  be  made  so the  RastPort you pass here remains
  53.                         unchanged. This must be valid.
  54.  
  55.                 impe_Extent -- This   field   is   used  to  store  the  label
  56.                         extentions. The label extentions are simply the number
  57.                         of pixels  which  the label extends the image bounding
  58.                         box in either direction.  The Left and Top fields will
  59.                         always be smaller than or equal to zero. The Width and
  60.                         Height  fields  will always be equal to or bigger than
  61.                         zero. This must be valid.
  62.  
  63.                 impe_LabelSize -- In  this  field  the  total  pixel width and
  64.                         height of the label is stored. This must be valid.
  65.  
  66.                 impe_Flags -- This  field  may  contain  any of  the following
  67.                         flags:
  68.  
  69.                         EXTF_MAXIMUM -- Normally  when  this  method is called
  70.                                 the returned values are the extentions as they
  71.                                 are at the moment you call this method.   When
  72.                                 this flag is set the returned  values  are the
  73.                                 maximum  possible  extentions  the  label  can
  74.                                 have.
  75.  
  76.     CHANGED METHODS
  77.         None.
  78.  
  79.     SEE ALSO
  80.         baseclass.doc
  81.  
  82. labelclass/Attributes                                    labelclass/Attributes
  83.  
  84.     NAME
  85.         LAB_TextAttr -- ( struct TextAttr * )
  86.  
  87.     FUNCTION
  88.         Set  or  get  the  font that is to be used to render the label. Please
  89.         note  that the font you pass here is opened with OpenFont() so it must
  90.         be in memory already.
  91.  
  92.         Default is NULL. Applicability is (ISG).
  93.  
  94.     NAME
  95.         LAB_Style -- ( UWORD )
  96.  
  97.     FUNCTION
  98.         Set or get  the style as defined in <graphics/text.h> which is used to
  99.         render the font. Note that this style overrides the style of  the font
  100.         passed by the LAB_TextAttr attribute.
  101.  
  102.         Default is FS_NORMAL. Applicability is (ISG).
  103.  
  104.     SEE ALSO
  105.         LAB_TextAttr, <graphics/text.h>
  106.  
  107.     NAME
  108.         LAB_Underscore -- ( UBYTE )
  109.  
  110.     FUNCTION
  111.         Set or get  the  character that marks the character to be underscored.
  112.         Normally the underscored character is used to mark a key  which can be
  113.         used to control the gadget. Example:
  114.  
  115.                 LAB_Underscore, '@'
  116.  
  117.                 Will underscore the 'O' character in the following label:
  118.  
  119.                 "@Open"
  120.  
  121.         Default is 0. Applicability is (ISG).
  122.  
  123.     NAME
  124.         LAB_Place -- ( ULONG )
  125.  
  126.     FUNCTION
  127.         Set or get the place relative to the  image  bounding box at which the
  128.         label is rendered. The following places are possible:
  129.  
  130.                 PLACE_IN -- The label is cenetered inside the image bounds.
  131.  
  132.                 PLACE_LEFT -- The label is placed left of the image bounds and
  133.                         cenetered vertically.
  134.  
  135.                 PLACE_RIGHT -- The label is placed  right of the  image bounds
  136.                         and cenetered vertically.
  137.  
  138.                 PLACE_ABOVE -- The label is placed above the image  bounds and
  139.                         centered horizontally.
  140.  
  141.                 PLACE_BELOW -- The label is placed below the image  bounds and
  142.                         centered horizontally.
  143.  
  144.         Default is PLACE_IN. Applicability is (ISG).
  145.  
  146.     NAME
  147.         LAB_Label -- ( STRPTR )
  148.  
  149.     FUNCTION
  150.         Set or get the actual text for the label.
  151.  
  152.         Default is NULL. Applicabillity is (ISG).
  153.  
  154.     NAME
  155.         LAB_Flags -- ( ULONG )
  156.  
  157.     FUNCTION
  158.         Set or get  the flag settings of the label.   The  following flags are
  159.         possible:
  160.  
  161.                 LABF_HIGHLIGHT --  Normally  the  label  is  rendered  in  the
  162.                         TEXTPEN or FILLTEXTPEN color.  When this  flag  is set
  163.                         the label is rendered in the HIGHLIGHTTEXTPEN color.
  164.  
  165.                 LABF_HIGH_USCORE -- This is the  same  as  LABF_HIGHLIGHT only
  166.                         now the color of the underscoring is affected.
  167.  
  168.         Default is 0. Applicability is (ISG).
  169.  
  170.     SEE ALSO
  171.         LAB_Highlight, LAB_HighUScore, <intuition/screens.h>
  172.  
  173.     NAME
  174.         LAB_Highlight -- ( BOOL )
  175.  
  176.     FUNCTION
  177.         Set or clear the LABF_HIGHLIGHT flag.
  178.  
  179.         Default is FALSE. Applicability is (ISG).
  180.  
  181.     SEE ALSO
  182.         LAB_Flags
  183.  
  184.     NAME
  185.         LAB_HighUScore -- ( BOOL )
  186.  
  187.     FUNCTION
  188.         Set or clear the LABF_HIGH_USCORE flags.
  189.  
  190.         Default is FALSE. Applicability is (ISG).
  191.  
  192.     SEE ALSO
  193.         LAB_Flags
  194.  
  195.    NAME
  196.         LAB_Pen, LAB_DriPen, LAB_SelectedPen, LAB_SelectedDriPen -- ( UWORD )
  197.         ** V39 **
  198.  
  199.    FUNCTION
  200.         To specify the colors of a label.  The  LAB_xxPen  attributes must  be
  201.         used  to  specify  the pen number of the used color. The LAB_xxxDriPen
  202.         attributes  must  be  used  to specify the DrawInfo pen number to use.
  203.         You can specify two colors. The  text  color  of the label in a normal
  204.         unselected  state  and  the text color of the label in selected state.
  205.  
  206.         Specifying ~0 (-1) for the pens will deactivate  the  text  color  and
  207.         the class will fall back to the default coloring sceme.
  208.  
  209.         Defaults are ~0. Applicability is (ISG).
  210.